
package syscall

const (
	EOK = Errno(0)
	ENOENT = Errno(_ENOENT)
	ENOMEM = Errno(_ENOMEM)
	ELIMIT = Errno(_ELIMIT)
	EREFUSED = Errno(_EREFUSED)
	EFORWARD = Errno(_EFORWARD)
	EPERM = Errno(_EPERM)
	EHANGUP = Errno(_EHANGUP)
	EPARTY = Errno(_EPARTY)
	EEXISTS = Errno(_EEXISTS)
	EBADMEM = Errno(_EBADMEM)
	ENOTSUP = Errno(_ENOTSUP)
	EADDRNOTAVAIL = Errno(_EADDRNOTAVAIL)
	ETIMEOUT = Errno(_ETIMEOUT)
	EINVAL = Errno(_EINVAL)
	EBUSY = Errno(_EBUSY)
	EOVERFLOW = Errno(_EOVERFLOW)
	EINTR = Errno(_EINTR)
	EMFILE = Errno(_EMFILE)
	ENAMETOOLONG = Errno(_ENAMETOOLONG)
	EISDIR = Errno(_EISDIR)
	ENOTDIR = Errno(_ENOTDIR)
	ENOSPC = Errno(_ENOSPC)
	EEXIST = Errno(_EEXIST)
	ENOTEMPTY = Errno(_ENOTEMPTY)
	EBADF = Errno(_EBADF)
	ERANGE = Errno(_ERANGE)
	EXDEV = Errno(_EXDEV)
	EIO = Errno(_EIO)
	EMLINK = Errno(_EMLINK)
	ENXIO = Errno(_ENXIO)
	EBADCHECKSUM = Errno(_EBADCHECKSUM)
	ESTALL = Errno(_ESTALL)
	EEMPTY = Errno(_EEMPTY)
	ENAK = Errno(_ENAK)
	EINPROGRESS = Errno(_EINPROGRESS)
	ENOTSOCK = Errno(_ENOTSOCK)
	EDESTADDRREQ = Errno(_EDESTADDRREQ)
	EPROTONOSUPPORT = Errno(_EPROTONOSUPPORT)
	ESOCKTNOSUPPORT = Errno(_ESOCKTNOSUPPORT)
	EPFNOSUPPORT = Errno(_EPFNOSUPPORT)
	EAFNOSUPPORT = Errno(_EAFNOSUPPORT)
	EADDRINUSE = Errno(_EADDRINUSE)
	ENOTCONN = Errno(_ENOTCONN)
	ECONNREFUSED = Errno(_ECONNREFUSED)
	ECONNABORTED = Errno(_ECONNABORTED)
	EAGAIN = Errno(_EAGAIN)
	ENODATA = Errno(_NO_DATA)
)

const (
	O_CREAT  = _O_CREAT
	O_EXCL   = _O_EXCL
	O_TRUNC  = _O_TRUNC
	O_APPEND = _O_APPEND
	O_RDONLY = _O_RDONLY
	O_RDWR   = _O_RDWR
	O_WRONLY = _O_WRONLY
	O_DESC   = _O_DESC
)

const (
	TASK_EXIT_NORMAL = _TASK_EXIT_NORMAL
	TASK_EXIT_UNEXPECTED = _TASK_EXIT_UNEXPECTED
)

const (
	FIBRIL_PREEMPT = _FIBRIL_PREEMPT
	FIBRIL_TO_MANAGER = _FIBRIL_TO_MANAGER
	FIBRIL_FROM_MANAGER = _FIBRIL_FROM_MANAGER
	FIBRIL_FROM_DEAD = _FIBRIL_FROM_DEAD
)

const (
	ASYNC_EXCHANGE_ATOMIC = _EXCHANGE_ATOMIC
	ASYNC_EXCHANGE_PARALLEL = _EXCHANGE_PARALLEL
	ASYNC_EXCHANGE_SERIALIZE = _EXCHANGE_SERIALIZE
)

const (
	PHONE_NS = _PHONE_NS
	IPC_IF_KERNEL = _IPC_IF_KERNEL
	
	IPC_M_PHONE_HUNGUP = _IPC_M_PHONE_HUNGUP
	IPC_M_CONNECTION_CLONE = _IPC_M_CONNECTION_CLONE
	IPC_M_CLONE_ESTABLISH = _IPC_M_CLONE_ESTABLISH
	IPC_M_CONNECT_TO_ME = _IPC_M_CONNECT_TO_ME
	IPC_M_CONNECT_ME_TO = _IPC_M_CONNECT_ME_TO
	IPC_M_SHARE_OUT = _IPC_M_SHARE_OUT
	IPC_M_SHARE_IN = _IPC_M_SHARE_IN
	IPC_M_DATA_WRITE = _IPC_M_DATA_WRITE
	IPC_M_DATA_READ = _IPC_M_DATA_READ
	IPC_M_STATE_CHANGE_AUTHORIZE = _IPC_M_STATE_CHANGE_AUTHORIZE
	IPC_M_DEBUG = _IPC_M_DEBUG

	IPC_M_LAST_SYSTEM = _IPC_M_LAST_SYSTEM
	
	IPC_FIRST_USER_METHOD = _IPC_FIRST_USER_METHOD
)

const (
	AS_AREA_ANY = ^uintptr(0)
	AS_MAP_FAILED = ^uintptr(0)

	AS_AREA_READ = _AS_AREA_READ
	AS_AREA_WRITE = _AS_AREA_WRITE
	AS_AREA_EXEC = _AS_AREA_EXEC
	AS_AREA_CACHEABLE = _AS_AREA_CACHEABLE

	PAGE_SIZE = _PAGE_SIZE
)

